package com.seata.demo.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <p>Description: </p>
 *
 * @author zg
 * @version v1.0.0
 * @since 2024/1/30
 **/
@Configuration
public class Knife4jConfig {

    @Bean
    public OpenAPI springShopOpenAPI() {
        return new OpenAPI()
                // 接口文档标题
                .info(new Info().title("Seata Demo")
                        // 接口文档简介
                        .description("这是一个Seata示例的接口文档")
                        // 接口文档版本
                        .version("1.0")
                        // 开发者联系方式
                        .contact(new Contact().name("Bruce")))
                .externalDocs(new ExternalDocumentation()
                        .description("SpringBoot3 + knife4j"));
    }
}
